a, b, c = map(int, input().split())

i = 2
while True:
    if a % i == b % i and b % i == c % i:
        print(i)
        break
    i = i + 1
